]> permondes.de Git - Analog_Engine.git/blame_incremental - scripts/TP1 04.10 MassOnSphere.AESL
Potentials and Motion
[Analog_Engine.git] / scripts / TP1 04.10 MassOnSphere.AESL
... / ...
CommitLineData
1IDENTIFICATION DIVISION
2PROGRAM-ID MassOnSphere
3VERSION 20240124
4COMMENT A mass m rests at the apex on a fixed sphere with radius a.
5COMMENT With a slight displacement, it slides down the sphere without friction
6COMMENT x'' = C1*x*y - C3*x
7COMMENT y'' = C2*y*y - C4*y - g
8COMMENT Scaling: measuring distances in da-m (10¹ m)
9COMMENT Initial condition: slightly off the top of the sphere to get the mass rolling.
10COMMENT Note: x0 is a function of y0 with x0² + y0² = a²
11COMMENT Note: ICs have to be negative as the integrator is inverting
12
13ENVIRONMENT DIVISION
14ENGINE Anabrid-THAT
15TIMEBASE 1ms
16REQUIRES COEFFICIENT 7
17REQUIRES INTEGRATOR 4
18REQUIRES MULTIPLIER 2
19REQUIRES INVERTER 4
20REQUIRES SUMMER 2
21
22DATA DIVISION
23OUTPUT OUTPUT.X x
24OUTPUT OUTPUT.Y y
25# Example values based on a=1
26COEFFICIENT.1 3g/a² for xy e.g. 2,943
27COEFFICIENT.2 3g/a² for y²
28COEFFICIENT.3 2g/a for x e.g. 1,962
29COEFFICIENT.4 2g/a for y
30COEFFICIENT.5 g e.g. 0,981
31COEFFICIENT.6 a initial condition y e.g. 0,957
32COEFFICIENT.7 0 initial condition x, slightly above 0 to start motion, e.g. 0,290
33
34PROGRAM DIVISION
35-1 -> COEFFICIENT.5 -> -g
36-1 -> COEFFICIENT.6 -> -y0
37-1 -> COEFFICIENT.7 -> -x0
38
39x'' -> INTEGRATOR -> -x'
40-x', IC:-x0 -> INTEGRATOR -> x
41y'' -> INTEGRATOR -> -y'
42-y', IC:-y0 -> INTEGRATOR -> y
43x,y -> MULTIPLIER -> x*y
44y,y -> MULTIPLIER -> y^2
45x*y -> COEFFICIENT.1 -> 3g/a²*x*y/10
46y^2 -> COEFFICIENT.2 -> 3g/a²*y^2/10
47x -> COEFFICIENT.3 -> 2g/a*x/10
48y -> COEFFICIENT.4 -> 2g/a*y/10
492g/a*x/10 -> INVERTER -> -2g/a*x/10
502g/a*y/10 -> INVERTER -> -2g/a*y/10
5110:3g/a²*x*y/10, 10:-2g/a*x/10 -> SUMMER -> -x''
52-x'' -> INVERTER -> x''
5310:3g/a²*y^2/10, 10:-2g/a*y/10, 1:-g -> SUMMER -> -y''
54-y'' -> INVERTER -> y''
55
56OPERATION DIVISION
57MODE REPEAT
58OP-TIME 24ms # after that, the mass would jump off the sphere, which is not included in this model